id: ID variableage: Age in yearsalcuse: Alcohol useciguse: Cigarette usepotuse: Marijuana use| id | female | twopars | peerenc | parconf | paruse | age | alcuse | ciguse | potuse |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 7 | 11 | 13 | 15 | 5 | 6 | 5 |
| 1 | 0 | 1 | 7 | 11 | 13 | 16 | 5 | 6 | 5 |
| 1 | 0 | 1 | 7 | 11 | 13 | 17 | 5 | 5 | 4 |
| 1 | 0 | 1 | 7 | 11 | 13 | 18 | 6 | 7 | 5 |
| 6 | 1 | 0 | 6 | 14 | 16 | 15 | 8 | 9 | 6 |
| 6 | 1 | 0 | 6 | 14 | 16 | 16 | 8 | 8 | 5 |
\[\textbf{S}_{YY}=\begin{bmatrix}\sigma_1^2 & \sigma_{12} & \sigma_{13} & \sigma_{14} \\ & \sigma_2^2 & \sigma_{23} & \sigma_{24} \\ & & \sigma_3^2 & \sigma_{34} \\ & & & \sigma_4^2 \end{bmatrix}\]
The linear mixed model:
\[Y = \textbf{X}\beta + \textbf{Z}\gamma + \epsilon\]
\[Y = \textbf{X}\beta + \textbf{Z}\gamma + \epsilon\]
\[\textbf{R}=\begin{bmatrix}\sigma_1^2 & \sigma_{12} & \sigma_{13} & \sigma_{14} \\ & \sigma_2^2 & \sigma_{23} & \sigma_{24} \\ & & \sigma_3^2 & \sigma_{34} \\ & & & \sigma_4^2 \end{bmatrix}\]
\[\textbf{R}=\begin{bmatrix}\sigma_1^2 & \sigma_{12} & \sigma_{13} & \sigma_{14} \\ & \sigma_2^2 & \sigma_{23} & \sigma_{24} \\ & & \sigma_3^2 & \sigma_{34} \\ & & & \sigma_4^2 \end{bmatrix}\]
\[\textbf{R}=\begin{bmatrix}\sigma^2 + \sigma_1^2 & \sigma_1^2 & \sigma_1^2 & \sigma_1^2 \\ & \sigma^2 + \sigma_1^2 & \sigma_1^2 & \sigma_1^2 \\ & & \sigma^2 + \sigma_1^2 & \sigma_1^2 \\ & & & \sigma^2 + \sigma_1^2 \end{bmatrix}\]
\[\textbf{R}=\begin{bmatrix}\sigma^2 & \sigma^2\rho & \sigma^2\rho^2 & \sigma^2\rho^3 \\ & \sigma^2 & \sigma^2\rho & \sigma^2\rho^2 \\ & & \sigma^2 & \sigma^2\rho \\ & & & \sigma^2 \end{bmatrix}\]
\[\textbf{R}=\begin{bmatrix}\sigma_{1}^2 & 0 & 0 & 0 \\ & \sigma_{2}^2 & 0 & 0 \\ & & \sigma_{3}^2 & 0 \\ & & & \sigma_{4}^2 \end{bmatrix}\]
Generalized least squares fit by maximum likelihood
Model: alcuse ~ 1 + age15
Data: alcuse_tall
AIC BIC logLik
981.0951 1017.108 -481.5476
Correlation Structure: General
Formula: ~1 | id
Parameter estimate(s):
Correlation:
1 2 3
2 0.580
3 0.421 0.605
4 0.324 0.366 0.340
Coefficients:
Value Std.Error t-value p-value
(Intercept) 5.901857 0.08824313 66.88177 0.0000
age15 0.105372 0.03342207 3.15278 0.0017
Correlation:
(Intr)
age15 -0.633
Standardized residuals:
Min Q1 Med Q3 Max
-3.418749537 -0.239414053 -0.007940977 0.858943288 2.304510243
Residual standard error: 0.9104505
Degrees of freedom: 404 total; 402 residual
[,1] [,2] [,3] [,4]
[1,] 1.0000000 0.5797687 0.4208941 0.3236446
[2,] 0.5797687 1.0000000 0.6053009 0.3663275
[3,] 0.4208941 0.6053009 1.0000000 0.3404776
[4,] 0.3236446 0.3663275 0.3404776 1.0000000
Generalized least squares fit by maximum likelihood
Model: alcuse ~ 1 + age15
Data: alcuse_tall
AIC BIC logLik
988.1413 1004.147 -490.0706
Correlation Structure: Compound symmetry
Formula: ~1 | id
Parameter estimate(s):
Rho
0.4430272
Coefficients:
Value Std.Error t-value p-value
(Intercept) 5.890099 0.08302555 70.94321 0.0000
age15 0.107921 0.03036304 3.55435 0.0004
Correlation:
(Intr)
age15 -0.549
Standardized residuals:
Min Q1 Med Q3 Max
-3.405625651 -0.234496379 0.002171263 0.861991319 2.313480479
Residual standard error: 0.9120029
Degrees of freedom: 404 total; 402 residual
[,1] [,2] [,3] [,4]
[1,] 1.0000000 0.4430272 0.4430272 0.4430272
[2,] 0.4430272 1.0000000 0.4430272 0.4430272
[3,] 0.4430272 0.4430272 1.0000000 0.4430272
[4,] 0.4430272 0.4430272 0.4430272 1.0000000
| Model | AIC | -2LL | # parameters |
|---|---|---|---|
| Unstructured | 981.095 | 963.095 | 10 |
| Compound symmetry | 988.141 | 980.141 | 2 |
\[\textbf{G}=\begin{bmatrix}\sigma_{int}^2 & \sigma_{int-slope} \\ & \sigma_{slope}^2 \end{bmatrix}\]
\[Y = \textbf{X}\beta + \textbf{Z}\gamma + \epsilon\]
Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
method [lmerModLmerTest]
Formula: alcuse ~ 1 + age15 + (1 + age15 | id)
Data: alcuse_tall
AIC BIC logLik deviance df.resid
985.7 1009.7 -486.8 973.7 398
Scaled residuals:
Min 1Q Median 3Q Max
-2.71801 -0.60424 -0.07987 0.54069 2.97288
Random effects:
Groups Name Variance Std.Dev. Corr
id (Intercept) 0.55174 0.7428
age15 0.03706 0.1925 -0.59
Residual 0.40148 0.6336
Number of obs: 404, groups: id, 101
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 5.89010 0.09080 100.99824 64.866 < 0.0000000000000002 ***
age15 0.10792 0.03409 100.99947 3.166 0.00204 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr)
age15 -0.653
Groups Name Std.Dev. Corr
id (Intercept) 0.74279
age15 0.19252 -0.586
Residual 0.63363
| Model | Intercept | Slope |
|---|---|---|
| \(\textbf{R}\) unstructured | 5.902 | 0.105 |
| \(\textbf{G}\) with random intercept and slope | 5.89 | 0.108 |